#include <stdio.h>
#include "linktest.h"

int main(int argc, const char *argv[])
{
	int choosenum=0;
	int posfind=0;
	link_list *H=creatnode();
	while(1)
	{
		printf("*********************\n");
		printf("1.head	2.tail	3.pos\n");
		printf("4.head	5.tail	6.pos\n");
		printf("7.mod	8.posv	9.vie\n");
		printf("*********************\n");
		printf("plz input choose\n");
		printf(">>>");
		scanf("%d",&choosenum);
		switch(choosenum)
		{
			case 1:
				headinsertnode(H);
				break;
			case 2:
				tailinsertnode(H);
				break;
			case 3:
				posinsert(H);
				break;
			case 4:
				headdeletenode(H);
				break;
			case 5:
				taildeletenode(H);
				break;
			case 6:
				posdelete(H);
				break;
			case 7:
				printf("plz input pos\n");
				printf(">>");
				scanf("%d",&posfind);
				modnode(H,posfind);
				break;
			case 8:
				printf("plz input pos\n");
				printf(">>");
				scanf("%d",&posfind);
				posview(H,posfind);
				break;
			case 9:
				view(H);
				break;
			default:
				printf("input error\n");
				break;
		}
	}

	return 0;
}
